{"ast":null,"code":"import * as React from 'react';\nimport Cell from \"../Cell\";\nimport ExpandedRowContext from \"../context/ExpandedRowContext\";\nimport TableContext from \"../context/TableContext\";\nimport { useContextSelector } from \"../ContextSelector\";\nfunction ExpandedRow(_ref) {\n  var prefixCls = _ref.prefixCls,\n    children = _ref.children,\n    Component = _ref.component,\n    cellComponent = _ref.cellComponent,\n    className = _ref.className,\n    expanded = _ref.expanded,\n    colSpan = _ref.colSpan,\n    isEmpty = _ref.isEmpty;\n  var scrollbarSize = useContextSelector(TableContext, 'scrollbarSize');\n  var _useContextSelector = useContextSelector(ExpandedRowContext, ['fixHeader', 'fixColumn', 'componentWidth', 'horizonScroll']),\n    fixHeader = _useContextSelector.fixHeader,\n    fixColumn = _useContextSelector.fixColumn,\n    componentWidth = _useContextSelector.componentWidth,\n    horizonScroll = _useContextSelector.horizonScroll; // Cache render node\n\n  return React.useMemo(function () {\n    var contentNode = children;\n    if (isEmpty ? horizonScroll : fixColumn) {\n      contentNode = /*#__PURE__*/React.createElement(\"div\", {\n        style: {\n          width: componentWidth - (fixHeader ? scrollbarSize : 0),\n          position: 'sticky',\n          left: 0,\n          overflow: 'hidden'\n        },\n        className: \"\".concat(prefixCls, \"-expanded-row-fixed\")\n      }, componentWidth !== 0 && contentNode);\n    }\n    return /*#__PURE__*/React.createElement(Component, {\n      className: className,\n      style: {\n        display: expanded ? null : 'none'\n      }\n    }, /*#__PURE__*/React.createElement(Cell, {\n      component: cellComponent,\n      prefixCls: prefixCls,\n      colSpan: colSpan\n    }, contentNode));\n  }, [children, Component, className, expanded, colSpan, isEmpty, scrollbarSize, componentWidth, fixColumn, fixHeader, horizonScroll]);\n}\nexport default ExpandedRow;","map":{"version":3,"names":["React","Cell","ExpandedRowContext","TableContext","useContextSelector","ExpandedRow","_ref","prefixCls","children","Component","component","cellComponent","className","expanded","colSpan","isEmpty","scrollbarSize","_useContextSelector","fixHeader","fixColumn","componentWidth","horizonScroll","useMemo","contentNode","createElement","style","width","position","left","overflow","concat","display"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-table/es/Body/ExpandedRow.js"],"sourcesContent":["import * as React from 'react';\nimport Cell from \"../Cell\";\nimport ExpandedRowContext from \"../context/ExpandedRowContext\";\nimport TableContext from \"../context/TableContext\";\nimport { useContextSelector } from \"../ContextSelector\";\n\nfunction ExpandedRow(_ref) {\n  var prefixCls = _ref.prefixCls,\n      children = _ref.children,\n      Component = _ref.component,\n      cellComponent = _ref.cellComponent,\n      className = _ref.className,\n      expanded = _ref.expanded,\n      colSpan = _ref.colSpan,\n      isEmpty = _ref.isEmpty;\n  var scrollbarSize = useContextSelector(TableContext, 'scrollbarSize');\n\n  var _useContextSelector = useContextSelector(ExpandedRowContext, ['fixHeader', 'fixColumn', 'componentWidth', 'horizonScroll']),\n      fixHeader = _useContextSelector.fixHeader,\n      fixColumn = _useContextSelector.fixColumn,\n      componentWidth = _useContextSelector.componentWidth,\n      horizonScroll = _useContextSelector.horizonScroll; // Cache render node\n\n\n  return React.useMemo(function () {\n    var contentNode = children;\n\n    if (isEmpty ? horizonScroll : fixColumn) {\n      contentNode = /*#__PURE__*/React.createElement(\"div\", {\n        style: {\n          width: componentWidth - (fixHeader ? scrollbarSize : 0),\n          position: 'sticky',\n          left: 0,\n          overflow: 'hidden'\n        },\n        className: \"\".concat(prefixCls, \"-expanded-row-fixed\")\n      }, componentWidth !== 0 && contentNode);\n    }\n\n    return /*#__PURE__*/React.createElement(Component, {\n      className: className,\n      style: {\n        display: expanded ? null : 'none'\n      }\n    }, /*#__PURE__*/React.createElement(Cell, {\n      component: cellComponent,\n      prefixCls: prefixCls,\n      colSpan: colSpan\n    }, contentNode));\n  }, [children, Component, className, expanded, colSpan, isEmpty, scrollbarSize, componentWidth, fixColumn, fixHeader, horizonScroll]);\n}\n\nexport default ExpandedRow;"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,kB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